{% extends "baseD.html" %}

{% block headtitle %}- Results{% endblock %}

{% block css %}
	<link href="/live3dstatic/css/viewAll.css" rel="stylesheet" type="text/css" media="screen" />
{% endblock %}

{% block scripts %}{% endblock %}

{% block onload %} {% endblock %}

{% block divtitle %}- Results{% endblock %}

{% block content %}
    <div id="contentpage"  style="margin-left:40px; margin-right:40px;">
	<div id="pagebox">
		{% for page in firstGroup %}
			<a class="pagenum" href="scenesURL?page={{page}}"> {{page}} </a>
		{% endfor %}
		{% if prevEllipsis %} ... {% endif%}
		{% for page in prev %}
			<a class="pagenum" href="scenesURL?page={{page}}"> {{page}} </a>
		{% endfor %}
		<p id="chosenpagenum">{{thisPage }}</p>
		{% for page in next %}
			<a class="pagenum" href="scenesURL?page={{page}}"> {{page}} </a>
		{% endfor %}
		{% if nextEllipsis %} ... {% endif %}
		{% for page in lastGroup %}
			<a class="pagenum" href="scenesURL?page={{page}}"> {{page}} </a>
		{% endfor %}
	</div>
	{% for scene in scenes %}
		<div class="group">
			<a href="viewScene?scene={{scene.index}}">
				<div class="imageshadow">
					{% ifnotequal scene.firstImage  "-1" %}
						<img src='/renderOriginalImage/{{scene.index}}.jpg' alt="" class="smallimage" />
					{% else %}
						<img src='{{scene.url}}' alt="" class="smallimage" />
					{% endifnotequal %}
				</div>
			</a>
			<div class="infocontainer">
				<div class="sceneInfo">
					<h3>
						{% if scene.name %}
							{{scene.name}}
						{% endif %}
					</h3>
					<p> Calibrated: 
						{% if scene.calibrated %}
							<span class="yes"> Yes </span>
						{% else %}
							<span class="no"> No </span>
						{% endif %}
					</p>
					<p>
						{% if scene.amosId %}
							AMOS Camera {{scene.amosId}}
						{% else %}
							&nbsp;
						{% endif %}
					</p>
					<p>
						{% if scene.is_private %}
							This scene is private.
							<ul>
								<li><form action='makePublic' method='post' >
									<input type='hidden' name='scene' value='{{scene.index}}'>
									<input type='submit' value='Make Public'>
									</form></li>
								<li><form action='adminModify' method='post' onsubmit="return confirm('Are you sure you want to delete the entire scene?  This is irreversible.');">
									<input type='hidden' name='scene' value='{{scene.index}}'>
									<input type='hidden' name='deleteScene' value='yes'>
									<input type='submit' value='Delete Scene'>
									</form></li>
							</ul>
						{% endif %}
					</p>
				</div>
				
				<div class="rating">
					<p>
					{% if scene.ratingAverage %}
						{% for star in scene.stars %}
							{% if star %}
								<img class="ratinglink" src="/live3dstatic/images/star.png">
							{% else %}
								<img class="ratinglink" src="/live3dstatic/images/unstar.png">
							{% endif %}
						{% endfor %}
						<br/>
					</p>
					<p>
						{{ scene.ratingCount }} vote{{ scene.ratingCount|pluralize }}
					</p>
					{% endif %}
				</div>
			</div>
			
		</div>
	{% endfor %}
	
	<div id="footerbox">
	{% for page in firstGroup %}
		<a class="pagenum" href="scenesURL?page={{page}}"> {{page}} </a>
	{% endfor %}
	{% if prevEllipsis %} ... {% endif%}
	{% for page in prev %}
		<a class="pagenum" href="scenesURL?page={{page}}"> {{page}} </a>
	{% endfor %}
	<p id="chosenpagenum">{{thisPage }}</p>
	{% for page in next %}
		<a class="pagenum" href="scenesURL?page={{page}}"> {{page}} </a>
	{% endfor %}
	{% if nextEllipsis %} ... {% endif %}
	{% for page in lastGroup %}
		<a class="pagenum" href="scenesURL?page={{page}}"> {{page}} </a>
	{% endfor %}
	</div>

    </div><!-- end contentpage --> 
{% endblock %}
		
{% block scripts2 %} {% endblock %}